Midterm: Customer Reviews API

Code Quality

Criteria Meet Specification

Does the code work?

All code is functional (i.e. no errors are thrown by the code). Warnings are okay, as long as they are not a result of poor coding practices.

Does the project follow good coding practices?

The project uses functions and loops where possible to reduce repetitive code. Comments are used as needed to document code functionality.

Relational Database Management System (RDBMS)

Criteria Meet Specification

The project demonstrates understanding of SQL DDL.

The project contains the necessary SQL scripts to create review, comment and product tables.

The project shows proper use of relational model constraints.

The project contains the SQL to create foreign key constraints on review & comment tables. Review is related to Product. Comment is related to Review.

The project demonstrates understanding of connecting an application to a relational database.

The project contains the following properties to properly connect to a relational database in Spring.
Spring.datasource.url, spring.datasource.username, spring.datasource.password

JPA

Criteria Meet Specification

The project demonstrates understanding of JPA.

The project contains the JPA entities for Product, Review & Comment.

The project demonstrates understanding of primary key (id) generation in JPA.

The project contains JPA entities which use at least one of the available id generation strategies in JPA.

The project shows proper use JPA data modeling.

The project contains JPA entities which are connected using JPA collections.

Spring Data JPA

Criteria Meet Specification

The project demonstrates understanding of Spring Data JPA.

The project contains Spring Data JPA repositories for Product, Review & Comment entities.

The project shows proper use Spring Data JPA Repository Query methods

The project contains Spring Data JPA repositories with methods following the query keywords and return types.

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repository-query-keywords

https://docs.spring.io/spring-data/jpa/docs/current/reference/html/#repository-query-return-types

The project demonstrates usage of Spring Data JPA repositories.

The project contains the correct methods wired in at the provided controllers in the starter code.

The project demonstrates usage Spring test framework.

The project has tests for all the methods in the Spring Data JPA repositories.

The project shows proper use of H2 database for testing.

The project has tests for Spring Data JPA repositories that run against a H2 database.